From: Joey Hess Date: Tue, 23 Sep 2025 03:48:46 +0000 (-0400) Subject: worse X-Git-Tag: archive/raspbian/10.20251029-1+rpi1~1^2~3^2~75 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3d1c871b8d92fcabb41ba653c4a39d87c1d80aa2;p=git-annex.git worse --- diff --git a/doc/bugs/annex_import_doesn__39__t_delete_files_during_updates/comment_2_9b3b7d6af9add0e8d6cb3e59b2768ff1._comment b/doc/bugs/annex_import_doesn__39__t_delete_files_during_updates/comment_2_9b3b7d6af9add0e8d6cb3e59b2768ff1._comment new file mode 100644 index 0000000000..b9304aaff6 --- /dev/null +++ b/doc/bugs/annex_import_doesn__39__t_delete_files_during_updates/comment_2_9b3b7d6af9add0e8d6cb3e59b2768ff1._comment @@ -0,0 +1,28 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 2""" + date="2025-09-23T03:41:09Z" + content=""" +In just the right circumstance, this can also prevent import from +adding files. If an export deleted a file, and then it was written back to +the special remote, in a way that caused it to have an identical content +identifier, then import would see no change when diffing, and so would not +add the file back. + +With the directory special remote, the way to trigger this is: + + git rm foo + git commit -m rm + mv ../directory/foo .. + git-annex export master --to remote + mv ../foo ../directory/foo + git-annex import master --from remote + git merge remote/master + +The `mv` is needed to preserve the inode, which is used in the content +identifier. + +With other types of special remotes that have less good content +identifiers, it might suffice for the same content to be written to the +special remote. +"""]]